/**
 * 这个文件定义了状态机
 */
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);

import data from './data';

const store = new Vuex.Store({
    state: {
        componentsData: data,
        keyword: ''
    },
    mutations: {
        changeKeyword(state, payload) {
            state.keyword = payload;
        },
    }
})

export default store;